<template>
  <div class="status_box">
    <img src="@/assets/images/echarts/tingji.png" alt="" v-if="data.status == 0" />
    <img src="@/assets/images/echarts/zhengchang.png" alt="" v-else-if="data.status == 1" />
    <img src="@/assets/images/echarts/lixian.png" alt="" v-else />
    <div class="name">{{ data.name }}</div>
    <div class="status" style="color:#fc2a2a" v-if="data.status == 0">
      停机
    </div>
    <div class="status" style="color:#0acde9" v-else-if="data.status == 1">
      正常
    </div>
    <div class="status" style="color:#ffffff" v-else>
      离线
    </div>
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Object,
      default: () => ({
        status: 1,
        name: "吹罐装",
      }),
    },
  },
};
</script>

<style lang="scss" scoped>
.status_box {
  width: 100%;
  height: 100%;
  //   background: red;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  img {
    width: 75px;
  }
  @media screen and (max-width: 961px) {
    img {
      width: 70px;
    }
  }
  .name {
    font-size: 14px;
    font-family: Source Han Sans CN, Source Han Sans CN-Regular;
    font-weight: 400;
    text-align: left;
    color: #d4f0ff;
    margin: 6px 0;
  }
  .status {
    font-size: 12px;
    font-family: Source Han Sans CN, Source Han Sans CN-Light;
    font-weight: 300;
    text-align: left;
    color: #10ffff;
  }
}
</style>